package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class NextValueExpression implements NonparenthesizedValueExpressionPrimary {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName sequenceGeneratorName;

    public NextValueExpression(int beginIndex, SchemaQualifiedName sequenceGeneratorName) {
        this.beginIndex = beginIndex;
        this.endIndex = sequenceGeneratorName.getEndIndex();
        this.sequenceGeneratorName = sequenceGeneratorName;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getSequenceGeneratorName() {
        return sequenceGeneratorName;
    }

}
